From: Tim Starling Date: Mon, 24 Oct 2005 00:43:49 +0000 (+0000) Subject: Avoid hexadecimal directory names where possible X-Git-Tag: 1.6.0~1339 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=c7e774e6b555f7d89ef89a6816080c10d6161540;p=lhc%2Fweb%2Fwiklou.git Avoid hexadecimal directory names where possible --- diff --git a/maintenance/dumpHTML.inc b/maintenance/dumpHTML.inc index ec9f7101a4..250f8d502f 100644 --- a/maintenance/dumpHTML.inc +++ b/maintenance/dumpHTML.inc @@ -616,7 +616,7 @@ ENDTEXT; $dir .= '_'; } else { $c = $chars[$i]; - if ( ord( $c ) >= 128 || ctype_alnum( $c ) ) { + if ( ord( $c ) >= 128 || preg_match( '/[a-zA-Z0-9!#$%&()+,[\]^_`{}-]/', $c ) ) { if ( function_exists( 'mb_strtolower' ) ) { $dir .= mb_strtolower( $c ); } else { diff --git a/skins/htmldump/lookup.js b/skins/htmldump/lookup.js index 92c06ce42f..469ee9a183 100644 --- a/skins/htmldump/lookup.js +++ b/skins/htmldump/lookup.js @@ -56,10 +56,10 @@ function getHashedDirectory(pdbk, depth) { c = dbk.charAt(i); cc = dbk.charCodeAt(i); - if (cc >= 128 || /[a-zA-Z0-9]/.exec(c)) { + if (cc >= 128 || /[a-zA-Z0-9!#$%&()+,[\]^_`{}-]/.exec(c)) { dir += c.toLowerCase(); } else { - dir += binl2hex([cc]); + dir += binl2hex([cc]).substr(0,2).toUpperCase(); } } }